//
//  IndexBaseResModel.swift
//  koolcar
//
//  Created by xiantian on 2023/11/6.
//

import UIKit
import ObjectMapper

class IndexBaseResModel: Mappable {
    var code: String?
    var msg: String?
    var data: IndexBaseDataModel?
    
    func mapping(map: Map) {
        code <- map["code"]
        msg <- map["msg"]
        data <- map["data"]
    }
    required init?(map: Map) {
        
    }
}

class IndexBaseDataModel: Mappable {
    var androidLinks : String?
    var bottomArticleCategories : [BottomArticleCategoryModel]?
    var bottomcopies : [BottomcopyModel]?
    var companyInfo : [CompanyInfoModel]?
    var externalLinks : [ExternalLinkModel]?
    var isEnable : Int?
    var orderFlag : Int?
    var readFlag : Int?
    var storeUsedcarList : [StoreUsedcarListModel]?
    var webSiteInfomation : WebSiteInfomationModel?
    
    func mapping(map: Map) {
        androidLinks <- map["androidLinks"]
        bottomArticleCategories <- map["bottomArticleCategories"]
        bottomcopies <- map["bottomcopies"]
        companyInfo <- map["companyInfo"]
        externalLinks <- map["externalLinks"]
        isEnable <- map["isEnable"]
        orderFlag <- map["orderFlag"]
        readFlag <- map["readFlag"]
        storeUsedcarList <- map["storeUsedcarList"]
        webSiteInfomation <- map["webSiteInfomation"]
    }
    required init?(map: Map) {
        
    }
}

class BottomArticleCategoryModel: Mappable {
    
    var code : String?
    var createdTime : String?
    var delFlag : Int?
    var grade : Int?
    var id : Int?
    var isBottom : Int?
    var isEnable : Int?
    var modifyTime : String?
    var name : String?
    var nameEn : String?
    var nameSc : String?
    var orders : Int?
    var showType : Bool?
    var treePath : String?
    var url : String?
    var urls : String?
    var version : Int?
    
    func mapping(map: Map) {
        code <- map["code"]
        createdTime <- map["createdTime"]
        delFlag <- map["delFlag"]
        grade <- map["grade"]
        id <- map["id"]
        isBottom <- map["isBottom"]
        isEnable <- map["isEnable"]
        modifyTime <- map["modifyTime"]
        name <- map["name"]
        nameEn <- map["nameEn"]
        nameSc <- map["nameSc"]
        orders <- map["orders"]
        showType <- map["showType"]
        treePath <- map["treePath"]
        url <- map["url"]
        urls <- map["urls"]
        version <- map["version"]
    }
    required init?(map: Map) {
        
    }
}

class BottomcopyModel: Mappable {
    var content : String?
    var contentEn : String?
    var contentSc : String?
    var extUrl : String?
    var title : String?
    var titleEn : String?
    var titleSc : String?
    
    
    func mapping(map: Map) {
        content <- map["content"]
        contentEn <- map["contentEn"]
        contentSc <- map["contentSc"]
        extUrl <- map["extUrl"]
        title <- map["title"]
        titleEn <- map["titleEn"]
        titleSc <- map["titleSc"]
    }
    required init?(map: Map) {
        
    }
}


class CompanyInfoModel: Mappable {
    var articleCategoryId : Int?
    var author : String?
    var code : String?
    var content : String?
    var id : Int?
    var imageUrl : String?
    var title : String?
    var titleSc : String?
    
    func mapping(map: Map) {
        articleCategoryId <- map["articleCategoryId"]
        author <- map["author"]
        code <- map["code"]
        content <- map["content"]
        id <- map["id"]
        imageUrl <- map["imageUrl"]
        title <- map["title"]
        titleSc <- map["titleSc"]
    }
    required init?(map: Map) {
        
    }
}


class ExternalLinkModel: Mappable {
    var link : String?
    var src : String?
    func mapping(map: Map) {
        link <- map["link"]
        src <- map["src"]
    }
    required init?(map: Map) {
        
    }
}


class StoreUsedcarListModel: Mappable {
    var address : String?
    var addressEn : String?
    var addressSc : String?
    var areaId : Int?
    var areaName : String?
    var backgroundImages : String?
    var cityId : Int?
    var cityName : String?
    var createdTime : String?
    var delFlag : Int?
    var id : Int?
    var linkman : String?
    var name : String?
    var nameEn : String?
    var nameSc : String?
    var openingDate : String?
    var provinceId : Int?
    var provinceName : String?
    var showIndexPage : Int?
    var telephone : String?
    var urlType : Int?
    var urlPicture: String?
    
    func mapping(map: Map) {
        address <- map["address"]
        addressEn <- map["addressEn"]
        addressSc <- map["addressSc"]
        areaId <- map["areaId"]
        areaName <- map["areaName"]
        backgroundImages <- map["backgroundImages"]
        cityId <- map["cityId"]
        cityName <- map["cityName"]
        createdTime <- map["createdTime"]
        delFlag <- map["delFlag"]
        id <- map["id"]
        linkman <- map["linkman"]
        name <- map["name"]
        nameEn <- map["nameEn"]
        nameSc <- map["nameSc"]
        openingDate <- map["openingDate"]
        provinceId <- map["provinceId"]
        provinceName <- map["provinceName"]
        showIndexPage <- map["showIndexPage"]
        telephone <- map["telephone"]
        urlType <- map["urlType"]
        urlPicture <- map["urlPicture"]
    }
    required init?(map: Map) {
        
    }
}

class WebSiteInfomationModel: Mappable {
    var adTime : String?
    var content : String?
    var hotline : String?
    var id : Int?
    var isBindBanner : Int?
    var modifyTime : String?
    var storeLocalUrl : String?
    var title : String?
    var url : String?
    var usedcarId : Int?
    
    func mapping(map: Map) {
        adTime <- map["adTime"]
        content <- map["content"]
        hotline <- map["hotline"]
        id <- map["id"]
        isBindBanner <- map["isBindBanner"]
        modifyTime <- map["modifyTime"]
        storeLocalUrl <- map["storeLocalUrl"]
        title <- map["title"]
        url <- map["url"]
        usedcarId <- map["usedcarId"]
    }
    
    required init?(map: Map) {
        
    }
}
